<!DOCTYPE html>
<html>
<head>
    <title>五宝回收</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" href="${s.base}/mobile/css/weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/jquery-weui.min.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/base.css">
    <link rel="stylesheet" href="${s.base}/mobile/css/component.css?1232445">
    <style type="text/css">
		body,html{background: #e4e4e4;}
    </style>
</head>
<!-- 回收商圈入驻 -->
<body>
<div class="xyg-comp-form">
       <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title">
             昵称
            </div>
            <div class="xyg-comp-form-item-content">
             <input type="text" id="nickName" value="${webMember.nickName}" disabled />
            </div>
            <div class="clearBoth"></div>
       </div>
        <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title">
                卡号
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" id="cardNo" value="${webMember.cardNo}" disabled />
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title">
                姓名
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" id="name" value="${webMember.name}" placeholder="请先填写姓名" />
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title"> 
             联系电话
            </div>
            <div class="xyg-comp-form-item-content"> 
             <input type="text" id="phone" value="${webMember.phone}" placeholder="请先填写联系电话" />
            </div>
            <div class="clearBoth"></div>
       </div>
        <div class="xyg-comp-form-item-one">
            <div class="xyg-comp-form-item-title">
                地址
            </div>
            <div class="xyg-comp-form-item-content">
                <input type="text" id="addressName" value="${webMember.addressName}" placeholder="请先填写地址" />
            </div>
            <div class="clearBoth"></div>
        </div>
        <div class="xyg-comp-form-item">
            <div class="xyg-comp-form-item-textarea-title" >
                照片
            </div>
            <div class="xyg-comp-form-item-upload">
                <div class="xyg-comp-form-item-upload-pic" id="uploaderFiles" data-objectId="">
                    <img src="${webMember.headImage}"/>
                </div>
                <div class="clearBoth"></div>
            </div>
        </div>
    <input type="button" id="save" class="xyg-btn-one color-bs margin-top-1rem" value="提交"/>
  	</div>
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<script src="${s.base}/mobile/js/jquery-2.1.4.js"></script>
<script src="${s.base}/mobile/js/jquery-weui.js"></script>
<script src="${s.base}/mobile/fonts/iconfont.js"></script>
<script src="${s.base}/mobile/js/component.js"></script>
<script src="${s.base}/mobile/js/base.js"></script>
<script src="${s.base}/mobile/js/ajaxfileupload.js"></script>


<!--js分享代码开始-->
<input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
<input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
<input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
<input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
<input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
<input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
<input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
<input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
<script src="${s.base}/mobile/js/share.js"></script>
<script type="text/javascript">
    var memberId = '${memberId}';
    $("#save").on("click", function () {
        var name = $("#name").val();
        if (name == null || name == "") {
            $.toast("请先填写姓名", "text");
            return false;
        }
        var phone = $("#phone").val();
        if (phone == null || phone == "") {
            $.toast("请先填写联系电话", "text");
            return false;
        }
        var addressName = $("#addressName").val();
        if (addressName == null || addressName == "") {
            $.toast("请先填写地址", "text");
            return false;
        }
        var param = {
            id: memberId,
            name: name,
            phone: phone,
            addressName:addressName
        };
        $.showLoading("正在提交中");
        $.post("/phone/webMemberUpdate", param, function (result) {
            if (0 == result.code) {
                $.hideLoading();
                $.alert("提交成功",function () {
                    goMyPage(memberId);
                });
            } else {
                $.hideLoading();
                $.alert(result.msg);
            }
        }, "json");
    });
</script>
</html>
